package org.ybxb.okhttp.core;

import java.util.List;
import java.util.Map;

/**
 * @ProjectName: generator-report
 * @PackageName: org.ybxb.gr.core
 * @Description:
 * @Author: hy.bai
 * @Date: 2025-07-09 10:39
 */
public class OkHttpClientResult {

  /**
   * 是否成功
   */
  private boolean success = false;

  /**
   * http级，状态标识码
   */
  private Integer code;

  /**
   * http级，错误信息
   */
  private String message;

  /**
   * http级，返回头部
   */
  private Map<String, List<String>> headers;

  /**
   * http级，返回body
   */
  private byte[] body;

  public OkHttpClientResult() {}

  public OkHttpClientResult(boolean success, Integer code, String message) {
    this.success = success;
    this.code = code;
    this.message = message;
  }

  public boolean isSuccess() {
    return success;
  }

  public OkHttpClientResult setSuccess(boolean success) {
    this.success = success;
    return this;
  }

  public Integer getCode() {
    return code;
  }

  public OkHttpClientResult setCode(Integer code) {
    this.code = code;
    return this;
  }

  public String getMessage() {
    return message;
  }

  public OkHttpClientResult setMessage(String message) {
    this.message = message;
    return this;
  }

  public Map<String, List<String>> getHeaders() {
    return headers;
  }

  public OkHttpClientResult setHeaders(Map<String, List<String>> headers) {
    this.headers = headers;
    return this;
  }

  public byte[] getBody() {
    return body;
  }

  public OkHttpClientResult setBody(byte[] body) {
    this.body = body;
    return this;
  }
}
